<?php 
namespace app\index\model;

/**
* 帖子内容处理
*/
class Postaction
{
	// 首页评论处理
	public function handle($id)
	{
		$hand = db('user_talk')->where('nid',$id)->select();
		foreach ($hand as &$val) {
			$val['name'] = db('information')->where('userid', $val['uid'])->find()['name'];
            $val['addtime'] = date('y-m-d h:i',$val['addtime']);
            $val['num'] = db('note')->where('uid',$val['uid'])->count('*');
			$val['img'] = db('information')->where('userid', $val['uid'])->find()['img'];
			$val['jifen'] = db('information')->where('userid', $val['uid'])->find()['jifen'];
		}
		// var_dump($hand);die;
		return $hand;
	}
}